﻿// -----------------------------------------------------------------------
// <copyright file="ZoomPictureSection.cs" company="EPAM Systems">
////Copyright (c) EPAM Systems. All rights reserved.
// </copyright>
// -----------------------------------------------------------------------

namespace Epam.PhotoGallery.Bussines.Configuration
{
	using System.Configuration;

	/// <summary>
	/// ZoomPictureSection : ConfigurationSection
	/// </summary>
	public class ZoomPictureSection : ConfigurationSection
	{
		#region Constants

		/// <summary>
		/// string ZoomPictureSectionName
		/// </summary>
		public const string ZoomPictureSectionName = "RepositoryGroup/ZoomPicture";

		#endregion
		
		/// <summary>
		/// Gets or sets the CoverZoom.
		/// </summary>
		/// <value>
		/// Zoom cover in percent.
		/// </value>
		[ConfigurationProperty("CoverZoom", DefaultValue = "40", IsRequired = false)]
		public int CoverZoom
		{
			get
			{
				return (int)this["CoverZoom"];
			}
			set
			{
				this["CoverZoom"] = value;
			}
		}

		/// <summary>
		/// Gets or sets the FancyZoom.
		/// </summary>
		/// <value>
		/// Zoom Fancy in percent.
		/// </value>
		[ConfigurationProperty("FancyZoom", DefaultValue = "100", IsRequired = false)]
		public int FancyZoom
		{
			get
			{
				return (int)this["FancyZoom"];
			}
			set
			{
				this["FancyZoom"] = value;
			}
		}

		/// <summary>
		/// Gets or sets the average width.
		/// </summary>
		/// <value>
		/// The average width.
		/// </value>
		[ConfigurationProperty("AverageWidth", IsRequired = true)]
		public int AverageWidth
		{
			get
			{
				return (int)this["AverageWidth"];
			}
			set
			{
				this["AverageWidth"] = value;
			}
		}

		/// <summary>
		/// Gets or sets the average height.
		/// </summary>
		/// <value>
		/// The average height.
		/// </value>
		[ConfigurationProperty("AverageHeight", IsRequired = true)]
		public int AverageHeight
		{
			get
			{
				return (int)this["AverageHeight"];
			}
			set
			{
				this["AverageHeight"] = value;
			}
		}

		/// <summary>
		/// Gets or sets the is relative.
		/// </summary>
		/// <value>
		/// The is relative.
		/// </value>
		[ConfigurationProperty("relative", DefaultValue = "false", IsRequired = false)]
		public bool IsRelative
		{
			get
			{
				return (bool)this["relative"];
			}

			set
			{
				this["relative"] = value;
			}
		}
	}
}
